package com.ants.platform.core.bean;

import java.io.Serializable;
import java.util.Date;
import java.util.UUID;

/**
 * 请求信息
 * Created by liushun on 2016/8/22.
 */
public class Request implements Serializable {

    private String requestId; //请求日志ID

    private String requestUrl; //请求地址

    private String queryString; //请求参数

    private String requestType; //请求类型

    private String rquestIp; //请求IP

    private String sessionId; //session唯一标识

    private String userAgent; //请求客户端类型

    private String clientInfo; //客户端信息

    private Integer responseStatus; //响应返回类型

    private Date requestTime; //请求时间

    public Request(String requestUrl, String queryString, String requestType, String rquestIp, String sessionId, String userAgent, String clientInfo, Integer responseStatus) {
        this.requestId = UUID.randomUUID().toString();
        this.requestUrl = requestUrl;
        this.queryString = queryString;
        this.requestType = requestType;
        this.rquestIp = rquestIp;
        this.sessionId = sessionId;
        this.userAgent = userAgent;
        this.clientInfo = clientInfo;
        this.responseStatus = responseStatus;
        this.requestTime = new Date();
    }

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public String getRequestUrl() {
        return requestUrl;
    }

    public void setRequestUrl(String requestUrl) {
        this.requestUrl = requestUrl;
    }

    public String getQueryString() {
        return queryString;
    }

    public void setQueryString(String queryString) {
        this.queryString = queryString;
    }

    public String getRequestType() {
        return requestType;
    }

    public void setRequestType(String requestType) {
        this.requestType = requestType;
    }

    public String getRquestIp() {
        return rquestIp;
    }

    public void setRquestIp(String rquestIp) {
        this.rquestIp = rquestIp;
    }

    public String getSessionId() {
        return sessionId;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    public String getUserAgent() {
        return userAgent;
    }

    public void setUserAgent(String userAgent) {
        this.userAgent = userAgent;
    }

    public String getClientInfo() {
        return clientInfo;
    }

    public void setClientInfo(String clientInfo) {
        this.clientInfo = clientInfo;
    }

    public Integer getResponseStatus() {
        return responseStatus;
    }

    public void setResponseStatus(Integer responseStatus) {
        this.responseStatus = responseStatus;
    }

    public Date getRequestTime() {
        return requestTime;
    }

    public void setRequestTime(Date requestTime) {
        this.requestTime = requestTime;
    }
}